const say=(num:number):void=>{
    console.log('hi');
}

const say1=()=>{
    console.log(1);
}

const add4=():undefined=>{
    return undefined
}

const mySlice=()=>(state?:number,end?:number)=>{
    console.log('123');
}
mySlice()
mySlice(3)
mySlice(2,3)

const mySlice1=(start:number,end?:number)=>{
    console.log('123');
}
mySlice1(2)